import { createApp } from 'vue'
import '@/styles/base.scss'
import '@/styles/ui.scss'
import App from './App.vue'
import router from "./router/index";
import * as Icons from '@element-plus/icons-vue'
import { toLine } from "./utils/index.ts";
import mUI from "@/components/index.ts";
import ElementPlus from 'element-plus'  // 引入 Element Plus
import 'element-plus/dist/index.css'    // 引入样式文件
const app = createApp(App)

// 注册所有图标组件
for (const [key, component] of Object.entries(Icons)) {
  app.component(`el-icon-${toLine(key)}`, component)
}

// 注册路由和 Element Plus
app.use(router).use(ElementPlus).use(mUI)
app.mount('#app')
